NOPROFILE=
NOMAN=
NOPIC=
NOLINT=

#
# include
#
NCSTOPDIR= ../../../..
TOPDIR= $(NCSTOPDIR)/..

.if exists($(NCSTOPDIR)/Makefile.inc)
.include "$(NCSTOPDIR)/Makefile.inc"
.endif
.if exists($(NCSTOPDIR)/Makefile.conf)
.include "$(NCSTOPDIR)/Makefile.conf"
.endif

#
# definition
#
DIR_WSD_ROOT= ..
DIR_INCLUDE= $(DIR_WSD_ROOT)/include
DIR_MISSING= $(DIR_WSD_ROOT)/src/missing

LIB= wsd
LIBNAME= lib$(LIB).a

INSTALL= install -c

#
# path
#
.PATH:	$(DIR_WSD_ROOT)/src \
		$(DIR_MISSING)

#
# flags
#
CFLAGS+= -g -Wall
CFLAGS+= -I$(DIR_INCLUDE)
CFLAGS+= -I$(DIR_MISSING)

#
# src
#
SRCS+= libwsd.c
SRCS+= wsdc_cache.c
SRCS+= wsdc_discovery.c
SRCS+= wsdc_transfer.c
SRCS+= wsdc_util.c

# missing
SRCS+= uuid_create.c
SRCS+= uuid_create_nil.c
SRCS+= uuid_equal.c
SRCS+= uuid_from_string.c
SRCS+= uuid_is_nil.c
SRCS+= uuid_to_string.c

#
# object
#
all: $(LIBNAME)
	$(INSTALL) $(LIBNAME) $(NCS_TOP_LIB_DIR)

clean:
	rm -f ${NCS_TOP_LIB_DIR}/${LIBNAME}

.include <bsd.lib.mk>

